package com.seisys.service.system.mac;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.seisys.dao.DaoSupport;
import com.seisys.util.IData;


@Service
public class MacService
{

    @Resource(name = "daoSupport")
    private DaoSupport dao;

    @SuppressWarnings("unchecked")
    public List<IData> showListAllMac(IData param)
        throws Exception
    {
        return (List<IData>)dao.findForList("MacMapper.showListAllMac", param);

    }

    public void delMac(String[] param)
        throws Exception
    {
        dao.delete("MacMapper.delMac", param);

    }

    /**
     * mac编辑页面
     * 
     * @param param
     * @return
     * @throws Exception
     */
    public IData showMacIData(IData param)
        throws Exception
    {
        return (IData)dao.findForObject("MacMapper.showMacIData", param);
    }

    public void saveMac(IData param)
        throws Exception
    {
        dao.save("MacMapper.saveMac", param);
    }

    public void updateMac(IData param)
        throws Exception
    {
        dao.update("MacMapper.updateMac", param);
    }

    /**
     * Description: (查询mac地址)
     * 
     * @param mac_addr_code
     * @return
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public List<IData> hasCode(String mac_addr_code)
        throws Exception
    {
        return (List<IData>)dao.findForList("MacMapper.hasCode", mac_addr_code);
    }
}
